﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace EnCor.ModuleLoader
{
    public class ServiceContractConfigCollection : ConfigurationElementCollection
    {
        private const string Config_Interface = "interface";
        public ServiceContractConfigCollection()
        {
            this.AddElementName = Config_Interface;
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new ServiceContractConfig();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ServiceContractConfig)element).Type;
        }

        internal void AddElement(ServiceContractConfig element)
        {
            this.BaseAdd(element);
        }
    }
}
